#! /bin/bash

function input {
    cat tests/input1.1;
    
    COUNTER=0

    while [ $COUNTER -lt $1 ]; do
        sleep 1;
        let COUNTER+=1;
    done;
}

mkdir tests

echo -e "GET / HTTP/1.1\nHost:$1\n" > tests/input1.1

curl $1 -i > tests/outOriginal1.1

input $3 | netcat -i 1 localhost $2 > tests/outOur1.1

diff tests/outOriginal1.1 tests/outOur1.1
